package jia.temp;

import jia.core.characters.GameCharacter;
import jia.core.characters.PlayerClass;
import jia.core.items.Weapon;
import jia.core.items.Armor;
import jia.core.flags.ArmorFlags;

import java.util.Hashtable;

/**
 * This is one of 7 temporary classes until I get the data access working
 * I basically got tired oc cluttering up my runtime code with character
 * instantiation.
 * @author Erik Stell
 * @version 1.0
 *          Date: Sep 13, 2007
 */
public class Goldmoon{
    
    public Goldmoon(){
        
    }
    
    public GameCharacter init(){
        GameCharacter character1 = new GameCharacter("Goldmoon");
        character1.setId(5);
        character1.setSpritePath("resources/images/sprites/fem_10.gif");
        
        PlayerClass fighter = new PlayerClass();
        fighter.setPlayerClassId(1);
        fighter.setPlayerClassName("Cleric");
        fighter.setBaseHitDie(8);
        fighter.setClassLevel(1);
        fighter.setBaseFortSave(1);
        fighter.setBaseRefSave(1);
        fighter.setBaseWillSave(1);
        
        character1.setPlayerClass(fighter);
        
        Weapon carriedWeapon = new Weapon();
        carriedWeapon.setName("Mace");
        carriedWeapon.setType("Blunt");
        carriedWeapon.setDamageDie(1);
        carriedWeapon.setDamageDieSides(8);
        carriedWeapon.setBaseAttackVal(1);
        
        
        Hashtable equippedArmor = new Hashtable();
        Armor chest = new Armor();
        chest.setName("Cloth Shirt");
        chest.setId(1);
        chest.setAcBonus(1);
        ArmorFlags armorFlags = new ArmorFlags();
        armorFlags.setFlag(ArmorFlags.ARMOR_CHEST);
        chest.setArmorType(armorFlags);
        equippedArmor.put("Head", chest);
        
        Armor legs = new Armor();
        legs.setName("Cloth Pants");
        legs.setId(2);
        legs.setAcBonus(1);
        equippedArmor.put("Legs", legs);
        
        Armor bracers = new Armor();
        bracers.setId(4);
        bracers.setName("Leather Bracers");
        bracers.setAcBonus(1);
        equippedArmor.put("Wrists", bracers);
        
        Armor boots = new Armor();
        boots.setId(5);
        boots.setName("Leather Boots");
        boots.setAcBonus(1);
        equippedArmor.put("Feet", boots);
        
        Armor gloves = new Armor();
        gloves.setId(6);
        gloves.setName("Leather Gloves");
        gloves.setAcBonus(1);
        equippedArmor.put("Hands", gloves);
        
        character1.setEquippedArmor(equippedArmor);
        
        character1.setWeapon(carriedWeapon);
        character1.setReadiedWeapon(carriedWeapon);
        
        character1.setBaseSpeed(30);
        
        
        return character1;
    }
}
